package com.ruoyi.web.controller.common;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.vo.GetRegisterRes;
import com.ruoyi.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 注册 Controller
 */
@RestController
public class RegisterController {
    @Autowired
    private ISysConfigService sysConfigService;

    /**
     * 获取注册开关参数
     */
    @GetMapping("/getRegister")
    public R getRegister() {
        GetRegisterRes getRegisterRes = new GetRegisterRes();
        getRegisterRes.setCanRegister(sysConfigService.canRegister());
        return R.ok(getRegisterRes);
    }
}
